import React from 'react';
import ReactDOM from 'react-dom';
import './libs/css/reset.css';
import './index.css';
import App from './views/App';
import * as serviceWorker from './serviceWorker';
import {_dev} from "./config/api";
if(_dev) window._user = {hosId:'5',userid:'ChenXianLin',managerId:'363'};




window.hos={
  hosId:1
}
const root = document.getElementById('root');
// 防抖
let debounce;
root.addEventListener('click',e=>{
  if(debounce) e.stopPropagation();
  else debounce = setTimeout(()=>{debounce=null},400)
})

//移动端使用自适应单位rem
document.documentElement.style.fontSize = document.documentElement.clientWidth/ 750*100 + 'px';
window.onresize = function(){
  document.documentElement.style.fontSize = document.documentElement.clientWidth/ 750*100 + 'px';
}

ReactDOM.render(<App />, root);
serviceWorker.unregister();
